<?php 
class Country_Widget_CountryHeaderController extends Engine_Content_Widget_Abstract{
    public function indexAction(){
         // Don't render this if not authorized
        $viewer = Engine_Api::_()->user()->getViewer();
        if( !Engine_Api::_()->core()->hasSubject() ) {
          return $this->setNoRender();
        }
        
        $subject = Engine_Api::_()->core()->getSubject();
        //$this->
    
        // Get subject and check auth
        //$subject = Engine_Api::_()->core()->getSubject();
//        if( !$subject->authorization()->isAllowed($viewer, 'view') ) {
//          return $this->setNoRender();
//        }
    
        if(!$subject instanceof Country_Model_Country){
            return $this->setNoRender();
        }
        $this->getElement()->removeDecorator('title');
        $this->view->subject_id = $subject->getIdentity();
        
        $this->view->fag_thumb = $subject->getFLagTag('thumb.profile');
        $this->view->big_map = $subject->getBigMapTag('thumb.profile');
        
        
        
            
    }
}
?>